package cn.youqu.happy.module.youqu.controller.app.userActivity.vo;

import cn.youqu.happy.framework.common.validation.NullOrNotEmpty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

import static cn.youqu.happy.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@ApiModel("用户 APP - 用户发起活动更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AppUserActivityUpdateReqVO extends AppUserActivityBaseVO {

    @ApiModelProperty(value = "主键", required = true)
    @NotNull(message = "主键不能为空")
    private Integer id;

    @ApiModelProperty(value = "活动名")
    @NullOrNotEmpty(message = "活动名 不能为空")
    private String activityName;

    @ApiModelProperty(value = "图片")
    private List<String> imgList;

    @ApiModelProperty(value = "组队口号")
    @NullOrNotEmpty(message = "组队口号 不能为空")

    private String teamSlogan;

    @ApiModelProperty(value = "地点")
    @NullOrNotEmpty(message = "地点 不能为空")

    private String address;

    @ApiModelProperty(value = "详细内容")
    @NullOrNotEmpty(message = "详细内容 不能为空")
    private String detail;

    @ApiModelProperty(value = "最大成员数量")
    @Min(value = 1, message = "最大成员数量 必须大于0")
    private Integer maxPartners;

    @ApiModelProperty(value = "最小成员数量")
    @Min(value = 1, message = "最小成员数量 必须大于0")
    private Integer minPartners;

    @ApiModelProperty(value = "预约时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Date appointTime;

    @ApiModelProperty(value = "截止时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Date endTime;


}
